package com.zl.shirodemo.config;

import org.apache.shiro.authc.AuthenticationToken;

public class UserNamePasswordToken implements AuthenticationToken {
    private static final long serialVersionUID = -772645928525718124L;
    
    private  String userName;
    private  String password;
    
    public UserNamePasswordToken(String userName, String password) {
        this.userName = userName;
        this.password = password;
    }
    
    public String getUserName() {
        return userName;
    }
    
    public void setUserName(String userName) {
        this.userName = userName;
    }
    
    public String getPassword() {
        return password;
    }
    
    public void setPassword(String password) {
        this.password = password;
    }
    
    @Override
    public Object getPrincipal() {
        return userName;
    }
    
    @Override
    public Object getCredentials() {
        return password;
    }
}
